<?php
/**
 * 2021/4/1
 * Created by breeze
 * User: breeze
 */

namespace app\index\controller;


use app\index\business\logisticsBus;
use think\facade\View;

class Logistics extends IndexBase
{
    public function index(){
        View::assign('title','会员中心');
        return View::fetch();
    }
    public function edit(){
        View::assign('title','修改');
        return View::fetch();
    }
    public function myApply(){
        View::assign('title','我的报名');
        return View::fetch();
    }

    public function myConsignor(){
        View::assign('title','我的货主企业');
        return View::fetch();
    }
    public function reset(){
        View::assign('title','修改密码');
        return View::fetch();
    }
    public function myConsignorDetail(){
        $id = $this->request->param('id');
        View::assign('id',$id);
        View::assign('title','我的货主企业详情');
        return View::fetch();
    }
    public function getMyConsignorItemListPage(){
        $where = $this->request->param('where');
        $paging = $this->request->param('paging');
        $consignorBus = new logisticsBus();
        try {
            $res = $consignorBus->getAllListPage($where,$paging);
        } catch (\Exception $exception){
            return show(config('status.error'),$exception->getMessage());
        }
        return show(config('status.success'),'查询成功',$res);
    }
    public function getMyMemberInfoAddUserListPage(){
        $where = $this->request->param('where');
        $paging = $this->request->param('paging');
        $consignorBus = new logisticsBus();
        try {
            $res = $consignorBus->getMyMemberInfoAddUserListPageBus($where,$paging);
        } catch (\Exception $exception){
            return show(config('status.error'),$exception->getMessage());
        }
        return show(config('status.success'),'查询成功',$res);
    }
    public function getMyConsignorDetail(){
        $id = $this->request->param('id');
        $member_id = $this->request->param('member_id');
        $consignorBus = new logisticsBus();
        try {
            $res = $consignorBus->getMyConsignorDetailBus($id,$member_id);
        } catch (\Exception $exception){
            return show(config('status.error'),$exception->getMessage());
        }
        return show(config('status.success'),'查询成功',$res);
    }

}